<template>
	<view>
		<Navbar></Navbar>
		<view>
			<view class="u-p-30 u-font-34 u-font-bold">
				<span>已生成</span>
				<span class="u-color-puce">{{ calebrationData.user_info.name || ''}}</span>
				<span>专属海报，请保存下方图片或长按转发好友/朋友圈</span>
			</view>
			<u-image width="100%" :src="calebrationData.url" mode="widthFix"></u-image>
		</view>
	</view>
</template>

<script>
	import { userCelebrantion } from '@/network/api.js'
	import Navbar from '@/components/Navbar.vue'
	export default {
		components: {
			Navbar
		},
		data(){
			return{
				calebrationData: {}
			}
		},
		async onLoad(){
			await this.$onLaunched
			this.onGetUserImage()
		},
		methods:{
			async onGetUserImage(){
				const res = await userCelebrantion({user_id: uni.getStorageSync("user_id")})
				this.calebrationData = res.data
			}
		}
	}
</script>

<style>
</style>